home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / g_man / cat3 / OpenGL / glbitmap.z / glbitmap
Encoding:
Text File  |  2001-04-17  |  8.0 KB  |  136 lines

  1.  
  2.  
  3.  
  4. ggggllllBBBBiiiittttmmmmaaaapppp((((3333GGGG))))                   OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                   ggggllllBBBBiiiittttmmmmaaaapppp((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllBBBBiiiittttmmmmaaaapppp - draw a bitmap
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      void ggggllllBBBBiiiittttmmmmaaaapppp( GLsizei _w_i_d_t_h,
  14.                     GLsizei _h_e_i_g_h_t,
  15.                     GLfloat _x_o_r_i_g,
  16.                     GLfloat _y_o_r_i_g,
  17.                     GLfloat _x_m_o_v_e,
  18.                     GLfloat _y_m_o_v_e,
  19.                     const GLubyte *_b_i_t_m_a_p )
  20.  
  21.  
  22. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  23.      _w_i_d_t_h, _h_e_i_g_h_t Specify the pixel width and height of the bitmap image.
  24.  
  25.      _x_o_r_i_g, _y_o_r_i_g  Specify the location of the origin in the bitmap image.
  26.                    The origin is measured from the lower left corner of the
  27.                    bitmap, with right and up being the positive axes.
  28.  
  29.      _x_m_o_v_e, _y_m_o_v_e  Specify the _x and _y offsets to be added to the current
  30.                    raster position after the bitmap is drawn.
  31.  
  32.      _b_i_t_m_a_p        Specifies the address of the bitmap image.
  33.  
  34. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  35.      A bitmap is a binary image.  When drawn, the bitmap is positioned
  36.      relative to the current raster position, and frame buffer pixels
  37.      corresponding to 1's in the bitmap are written using the current raster
  38.      color or index.  Frame buffer pixels corresponding to 0's in the bitmap
  39.      are not modified.
  40.  
  41.      ggggllllBBBBiiiittttmmmmaaaapppp takes seven arguments.  The first pair specifies the width and
  42.      height of the bitmap image.  The second pair specifies the location of
  43.      the bitmap origin relative to the lower left corner of the bitmap image.
  44.      The third pair of arguments specifies _x and _y offsets to be added to the
  45.      current raster position after the bitmap has been drawn.  The final
  46.      argument is a pointer to the bitmap image itself.
  47.  
  48.      The bitmap image is interpreted like image data for the ggggllllDDDDrrrraaaawwwwPPPPiiiixxxxeeeellllssss
  49.      command, with _w_i_d_t_h and _h_e_i_g_h_t corresponding to the width and height
  50.      arguments of that command, and with _t_y_p_e set to GGGGLLLL____BBBBIIIITTTTMMMMAAAAPPPP and _f_o_r_m_a_t set
  51.      to GGGGLLLL____CCCCOOOOLLLLOOOORRRR____IIIINNNNDDDDEEEEXXXX.  Modes specified using ggggllllPPPPiiiixxxxeeeellllSSSSttttoooorrrreeee affect the
  52.      interpretation of bitmap image data; modes specified using
  53.      ggggllllPPPPiiiixxxxeeeellllTTTTrrrraaaannnnssssffffeeeerrrr do not.
  54.  
  55.      If the current raster position is invalid, ggggllllBBBBiiiittttmmmmaaaapppp is ignored.
  56.      Otherwise, the lower left corner of the bitmap image is positioned at the
  57.      window coordinates
  58.  
  59.                                  x  = | x  - x  |
  60.                                   w      r    o
  61.  
  62.  
  63.  
  64.                                                                         PPPPaaaaggggeeee 1111
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. ggggllllBBBBiiiittttmmmmaaaapppp((((3333GGGG))))                   OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                   ggggllllBBBBiiiittttmmmmaaaapppp((((3333GGGG))))
  72.  
  73.  
  74.  
  75.                                  y  = | y  - y  |
  76.                                   w      r    o
  77.  
  78.      where (x ,y ) is the raster position and (x ,y ) is the bitmap origin.
  79.              r  r                               o  o
  80.      Fragments are then generated for each pixel corresponding to a 1 (one) in
  81.      the bitmap image.  These fragments are generated using the current raster
  82.      _z coordinate, color or color index, and current raster texture
  83.      coordinates.  They are then treated just as if they had been generated by
  84.      a point, line, or polygon, including texture mapping, fogging, and all
  85.      per-fragment operations such as alpha and depth testing.
  86.  
  87.      After the bitmap has been drawn, the _x and _y coordinates of the current
  88.      raster position are offset by _x_m_o_v_e and _y_m_o_v_e.  No change is made to the
  89.      _z coordinate of the current raster position, or to the current raster
  90.      color, texture coordinates, or index.
  91.  
  92. NNNNOOOOTTTTEEEESSSS
  93.      To set a valid raster position outside the viewport, first set a valid
  94.      raster position inside the viewport, then call ggggllllBBBBiiiittttmmmmaaaapppp with NULL as the
  95.      _b_i_t_m_a_p parameter and with _x_m_o_v_e and _y_m_o_v_e set to the offsets of the new
  96.      raster position. This technique is useful when panning an image around
  97.      the viewport.
  98.  
  99. EEEERRRRRRRROOOORRRRSSSS
  100.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _w_i_d_t_h or _h_e_i_g_h_t is negative.
  101.  
  102.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllBBBBiiiittttmmmmaaaapppp is executed between the
  103.      execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ggggllllEEEEnnnndddd.
  104.  
  105. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  106.      ggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____PPPPOOOOSSSSIIIITTTTIIIIOOOONNNN
  107.      ggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____CCCCOOOOLLLLOOOORRRR
  108.      ggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____DDDDIIIISSSSTTTTAAAANNNNCCCCEEEE
  109.      ggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____IIIINNNNDDDDEEEEXXXX
  110.      ggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDDSSSS
  111.      ggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____PPPPOOOOSSSSIIIITTTTIIIIOOOONNNN____VVVVAAAALLLLIIIIDDDD
  112.  
  113.  
  114. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  115.      ggggllllDDDDrrrraaaawwwwPPPPiiiixxxxeeeellllssss, ggggllllPPPPiiiixxxxeeeellllSSSSttttoooorrrreeee, ggggllllPPPPiiiixxxxeeeellllTTTTrrrraaaannnnssssffffeeeerrrr, ggggllllRRRRaaaasssstttteeeerrrrPPPPoooossss
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.                                                                         PPPPaaaaggggeeee 2222
  133.  
  134.  
  135.  
  136.